<?php

require_once __DIR__."/bar/php/php-barcode.php";

$im     = imagecreatetruecolor(300, 110);
$black  = ImageColorAllocate($im,0x00,0x00,0x00);
$white  = ImageColorAllocate($im,0xff,0xff,0xff);
imagefilledrectangle($im, 0, 0, 300, 300, $white);
$data = Barcode::gd($im, $black, 150, 55, 0, "code128", "1234567", 3, 80);
header('Content-type: image/gif');
imagegif($im);
imagedestroy($im);